package com.dongdongshop.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbItemMapper;
import com.dongdongshop.pojo.item.TbItem;
import com.dongdongshop.pojo.item.TbItemExample;
import com.dongdongshop.service.item.ItemService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author Eayon
 * @Date 2020/3/6 16:54
 */
@Service
@Component
public class ItemServiceImpl implements ItemService {
    @Resource
    private TbItemMapper itemMapper;

    @Override
    public List<TbItem> selectItemList(TbItemExample example) {
        return itemMapper.selectByExample(example);
    }

    @Override
    public TbItem getItemByItemId(Long itemId) {
        return itemMapper.selectByPrimaryKey(itemId);
    }
}
